<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration {
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('activity', function (Blueprint $table) {
            $table->id();
            $table->string('name', 64)->comment('活动名称');
            $table->timestamp('start_time')->nullable(false)->comment('活动时间');
            $table->tinyInteger('current_round')->unsigned()->default(0)->comment('活动当前轮次');
            $table->tinyInteger('status')->unsigned()->default(0)->comment('活动状态；0 未开始，1进行中，2 已结束');
            $table->string('desc', 256)->comment('活动描述');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('activity');
    }
};
